#include "ArticleComment_types.h"

#include "redis_executor/redis_executor.h"
#include "redis_executor/scoped_reply.h"

namespace jztzp {

class RedisAdapter {
 public:
  int CommentAdd(const CommentItem& comment);
  int CommentRemove(int64_t id, int32_t article_id, int32_t sender_id);
  int CommentGetByArticle(CommentList * comments, int32_t article_id, int32_t offset, int32_t limit);
  int CommentCountByArticle(int32_t article_id);

  int CommentGetById(CommentItem * comment, int32_t article_id);
 private:
  RedisExecutor redis_exec_;
};

}

